package com.sourcetrip.arraylist;

import java.util.ArrayList;

/**
 * @author: ZhouBert
 * @date: 2020/11/16
 * @description:	ArrayList 的拷贝
 */
public class CloneTest02 {

	public static void main(String[] args) {
		ArrayList<String> list = new ArrayList<>();
		list.add("1");
		list.add("2");
		list.add("3");
		list.add("4");

		Object clone = list.clone();
		System.out.println("比较内存地址： " + (clone==list));
		System.out.println("比较数据是否一致：");
		System.out.println("list = " + list);
		System.out.println("clone = " + clone);
	}


}
